// 2278. 字母在字符串中的百分比
// AC: https://leetcode.cn/problems/percentage-of-letter-in-string/submissions/617753849/

class Solution {
public:
    int percentageLetter(string s, char letter) {
        int n=s.size();
        int m=0;
        for(int i=0;i<n;++i){
            if(s[i]==letter)
                m++;
        }
        m=(double)m/n*100;
        return m;
    }
};